package zl.com;

/**
 * Created with Intellij IDEA.
 * Description:
 * User:张蕾
 * Date:2023-05-30
 * Time:22:55
 */
public class User {
    private String name;//姓名
    private int money;//余额，当前钱

    public User() {
    }

    public User(String name, int money) {
        this.name = name;
        this.money = money;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return money
     */
    public int getMoney() {
        return money;
    }

    /**
     * 设置
     * @param money
     */
    public void setMoney(int money) {
        this.money = money;
    }

    public String toString() {
        return "User{name = " + name + ", money = " + money + "}";
    }

    public void show(){
        System.out.println("我叫："+name+"，我有多少钱："+money );
    }
}
